From 63e1efd4b3bd36c0801b269b395825843730c358 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 16 Mar 1993 05:54:56 +0000 Subject: [PATCH] [SIGIO] (UNBLOCK_INPUT): Resignal if x_pending_input. --- src/xterm.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/xterm.h b/src/xterm.h index 6fce7eb2a55..54a495d7bb0 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -180,8 +180,16 @@ extern int x_pending_input; #define BLOCK_INPUT (x_input_blocked++) /* End critical section. */ +#ifdef SIGIO +/* If doing interrupt input, and an interrupt came in when input was blocked, + reinvoke the interrupt handler now to deal with it. */ +#define UNBLOCK_INPUT \ + ((x_input_blocked--, (x_input_blocked < 0 ? (abort (), 0) : 0)), \ + (x_input_blocked == 0 && x_pending_input != 0 ? (kill (0, SIGIO), 0) : 0)) +#else #define UNBLOCK_INPUT \ (x_input_blocked--, (x_input_blocked < 0 ? (abort (), 0) : 0)) +#endif #define TOTALLY_UNBLOCK_INPUT (x_input_blocked = 0) #define UNBLOCK_INPUT_RESIGNAL UNBLOCK_INPUT -- 2.30.2